import {Injectable} from "@angular/core";
import {HttpService} from "./HttpService";
import {API_URL_SPORT_SPORT_DYNAMIC} from "./Constants";

@Injectable()
export class SportDynamicService {
  constructor(
    private httpService: HttpService,

  ) { }

  sportDynamicList(pageNum,pageSize){
    var url = API_URL_SPORT_SPORT_DYNAMIC+'list?pageNum='+pageNum+'&&pageSize='+pageSize;
    return this.httpService.httpGet(url);
  }
  sportDynamicDoLike(userId,sportDynamicId){
    var url = API_URL_SPORT_SPORT_DYNAMIC+'doLike?userId='+userId+'&&sportDynamicId='+sportDynamicId;
    return this.httpService.httpGet(url);
  }
  selectMySportDynamic(userId){
    var url = API_URL_SPORT_SPORT_DYNAMIC+'selectMySportDynamic?userId='+userId;
    return this.httpService.httpGet(url);
  }
  //删除动态
  deleteSportDynamic(id){
    var url = API_URL_SPORT_SPORT_DYNAMIC+'delete?id='+id;
    return this.httpService.httpGet(url);
  }
}
